<?php
	echo $this->Html->css('form');
	echo $this->Html->script('jquery.validate');
	echo $this->Html->script('jquery.metadata');
?>
<div class="product-box">
<h3><a href=""><?php echo __('Đăng nhập', true); ?></a></h3>
<div class="loginBox">
    <?php
            echo $session->flash();
            echo $form->create(
                    array(
                            'id'	=> 'formValidation',
                            'url'	=> array(
                                    'controller'	=> 'login',
                                    'action'		=> 'index',
                            ),
                            'autocomplete'=>'off'
                    )
            );
            echo "<fieldset>";
            echo $form->input(
                    'Login.username',
                    array(
                            'type'	=> 'text',
                            'label'	=> __('Username', true),
                            'div'	=> true,
                            'size'	=> 30
                    )
            );
            echo $form->input(
                    'Login.password',
                    array(
                            'type'	=> 'password',
                            'label'	=> __('Password', true),
                            'div'	=> true,
                            'size'	=> 30
                    )
            );
        ?>

            <div>
                    <label></label>
                    <?php echo $form->button(__('Login', true), array('type'=>'submit', 'class'=>'btn btn-danger')); ?>
            </div>
            <?php
            echo $form->end();
            ?>
        </div>
        <div>
                    <?php
                            echo $html->link(
                                    __('Create New Account', true),
                                    array('controller'=>'register', 'action'=>'index'),
                                    array('title'=>__('Create New Account', true) ,'class'=>'green')
                            );
                    ?>
                    | 
                    <?php
                            echo $html->link(
                                    __('Forget password', true),
                                    array('controller'=>'login', 'action'=>'forgot_pwd'),
                                    array('title'=>__('Forget password', true), 'class'=>'blue')
                            );
                    ?>
                            </td>
                    </tr>
        </div>
        <script type="text/javascript">
        $(document).ready(
                function() {
                        $.metadata.setType("attr", "validate");
                        $("form#formValidation").validate();
                }
        );
        </script>
            